package com.ld.security.server.blog.modules.cms.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ld.security.common.core.base.column.ListString;
import com.ld.security.common.core.base.column.MapJson;
import com.ld.security.common.mybatis.anno.LabelKeys;
import com.ld.security.common.mybatis.anno.SqlKey;
import com.ld.security.common.mybatis.base.entity.LabelMap;
import com.ld.security.common.mybatis.base.entity.SuperEntity;
import com.ld.security.common.mybatis.constant.SqlCondition;
import com.ld.security.common.mybatis.core.entity.SqlUserEntity;
import com.ld.security.auth.common.sys.entity.SysUserEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@TableName("cms_content")
@ApiModel("内容")
@Data
public class CmsContentEntity  extends SuperEntity implements LabelMap,SqlUserEntity
{


    public static final String content_type = "-1";

    @LabelKeys(CmsTagEntity.class)
    @SqlKey(SqlCondition.like_many)
    @ApiModelProperty("标签")
    private ListString cmsTags;







    @LabelKeys(CmsTypeEntity.class)
    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("分类")
    private String cmsType;

    @LabelKeys(SysUserEntity.class)
    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("作者")
    private String authorId;




    @ApiModelProperty("封面")
    private String picture;




    @SqlKey(SqlCondition.like)
    @ApiModelProperty("标题")
    private String label;



    @ApiModelProperty("好评量")
    private Integer goodTotal;




    @ApiModelProperty("点击量")
    private Integer clickTotal;


    @ApiModelProperty("内容")
    private String content;


    /**
     * -1代表内容
     */
    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("合集编号")
    private String collectId;

    private MapJson labelMap;

    @ApiModelProperty("摘要")
    private String digest;

    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("创建人")
    private String crtUser;
        }
